package com.smart4j.framework.aop.spring.four;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.stereotype.Component;

/**
 * description: org.aopalliance.intercept.MethodInterceptor 环绕增强，采用 spring*.xml 实现。
 * @version v1.0
 * @author w
 * @date 2018年9月22日下午10:30:48
 */
@Component
public class GreetingAroundAdvice implements MethodInterceptor {

	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		System.out.println("before ---->  spring*.xml");
		Object result = invocation.proceed();
		System.out.println("after ---->  spring*.xml");
		return result;
	}

}
